// import { t } from '@/entry_mobile/locales/index'
import { i18n } from '@/locales'
const { $t } = i18n

export const interfaceName = Object.freeze({
	myTask: 'ListDoneTaskPrivateV2POST',
	bidTask: 'ListCompetitionDoneTaskPrivateV2POST',
	agentTask: 'ListAgentDoneTaskPrivateV2POST',
	hasRead: 'ListReadNoticeTaskPrivateV2POST',
	noRead: 'ListUnreadNoticeTaskPrivateV2POST',
	myToDo: 'ListTodoTaskPrivateV2POST',
	agentTodo: 'ListAgentTodoTaskPrivateV2POST',
})
export const countByType = Object.freeze({
	toDo: 'CountByTypeTodoTaskPrivateV2POST',
	myTask: 'CountByTypeDoneTaskPrivateV2POST',
	bidTask: 'CountByTypeCompetitionDoneTaskPrivateV2POST',
	agentTask: 'CountByTypeAgentDoneTaskPrivateV2POST',
	hasRead: 'CountByTypeNoticeTaskPrivateV2POST',
	noRead: 'CountByTypeNoticeTaskPrivateV2POST',
	myToDo: 'CountByTypeTodoTaskPrivateV2POST',
	agentTodo: 'AgentToDoCountByTypeTaskPrivateV1POST',
})
export const countList = Object.freeze({
	toDo: 'CountTaskPrivateV2POST',
	myTask: 'CountByTypeDoneTaskPrivateV2POST',
	bidTask: 'CountByTypeCompetitionDoneTaskPrivateV2POST',
	agentTask: 'CountByTypeAgentDoneTaskPrivateV2POST',
	hasRead: 'CountByTypeNoticeTaskPrivateV2POST',
	noRead: 'CountByTypeNoticeTaskPrivateV2POST',
})

export const noDataText = {
	toDo:       $t('pages.task.Notodo', '暂无待办') ,
	myTask:     $t('pages.task.Noworkdone', '暂无已办') ,
	bidTask:    $t('pages.task.Noworkdone', '暂无已办') ,
	agentTask:  $t('pages.task.Noworkdone', '暂无已办') ,
	hasRead:    $t('pages.task.Nonotification', '暂无知会') ,
	noRead:     $t('pages.task.Nonotification', '暂无知会') ,
	noProcess:  $t('pages.task.noProcess', '暂无相关流程') ,
}

let done = [
	{
		name: $t('pages.task.processName', '流程名称') ,
		id: 'processName',
	},
	{
		name: $t('pages.task.sort', '优先顺序') ,
		id: 'sort',
	},
	{
		name: $t('pages.task.approvalRes', '审批结果') ,
		id: 'approvalRes',
	},
]
let other = [
	{
		name: $t('pages.task.processName', '流程名称'),
		id: 'processName',
	},
	{
		name: $t('pages.task.sort', '优先顺序'),
		id: 'sort',
	},
]
let agentTodoMap = [
	{
		name: $t('pages.task.client', '委托人'),
		id: 'client',
	},
	{
		name: $t('pages.task.processName', '流程名称'),
		id: 'processName',
	},
	{
		name: $t('pages.task.sort', '优先顺序'),
		id: 'sort',
	},
]
export const myTaskLeftTab = {
	toDo: other,
	myToDo: [
		{
			name: $t('pages.task.delegatedFillter', '委托过滤'),
			id: 'processFilter',
		},
		...other,
	],
	myTask: [
		...done,
		{
			name: $t('pages.task.taskOther', '其他'),
			id: 'taskOther',
		},
	],
	bidTask: done,
	agentTask: done,
	hasRead: other,
	noRead: other,
	agentTodo: agentTodoMap,
}

export const myTaskRightList = {
	sort: [
		{
			name: $t('pages.task.Latestarrpri', '最新到达优先'),
			id: 'desc',
		},
		{
			name: $t('pages.task.Longestwaitpri', '最久等待优先'),
			id: 'asc',
		},
	],
	approvalRes: [
		{
			name: $t('pages.process.select.whole', '全部'),
			id: '',
			count: 0,
		},
		{
			name: $t('pages.process.select.countersign', '加签'),
			id: 'endorsement',
			count: 0,
		},
		{
			name: $t('pages.process.select.agree', '同意'),
			id: 'general',
			count: 0,
		},
		{
			name: $t('pages.process.select.Submit', '提交'),
			id: 'submit',
			count: 0,
		},
		{
			name: $t('pages.process.select.withdraw', '撤回'),
			id: 'revoke',
			count: 0,
		},
		{
			name: $t('pages.process.select.Opposition', '反对'),
			id: 'voteAgainst',
			count: 0,
		},
		{
			name: $t('common.refuse', '拒绝'),
			id: 'rollBackTaskByExpression',
			count: 0,
		},
		{
			name: $t('pages.process.select.tovoid', '作废'),
			id: 'terminationProcess',
			count: 0,
		},
		{
			name: $t('pages.task.termination', '终止'),
			id: 'rejectAndTerminate',
			count: 0,
		},
		{
			name: $t('pages.process.select.Transfer', '转办'),
			id: 'transfer',
			count: 0,
		},
		{
			name: $t('pages.process.select.Staging', '暂存'),
			id: 'tempSave',
			count: 0,
		},
		{
			name: $t('pages.process.select.autoSkip', '自动跳过'),
			id: 'skipNode',
			count: 0,
		},
	],
	taskOther: [
		{
			name: $t('pages.task.showAll', '同一条流程展示所有已办'),
			id: 'showAll',
		},
		{
			name: $t('pages.task.showLast', '同一条流程仅展示最新一条已办'),
			id: 'showLast',
		},
	],
	processFilter: [
		{
			name: $t('delegate.unfiller', '显示委托待办'),
			id: 'showFilter',
		},
		{
			name: $t('delegate.filler', '过滤委托待办'),
			id: 'unshowFilter',
		},
	],
}

export const labelIdMap = {
	desc: $t('pages.task.Latestarrpri', '最新到达'),
	asc: $t('pages.task.Longestwaitpri', '最久等待'),
	all: $t('pages.process.select.whole', '全部'),
	endorsement:$t('pages.process.select.countersign', '加签'),
	general: $t('pages.process.select.agree', '同意'),
	submit: $t('pages.process.select.Submit', '提交'),
	revoke: $t('pages.process.select.withdraw', '撤回'),
	voteAgainst:$t('pages.process.select.Opposition', '反对'),
	rollBackTaskByExpression: $t('common.refuse', '拒绝'),
	terminationProcess: $t('pages.process.select.tovoid', '作废'),
	rejectAndTerminate: $t('pages.task.termination', '终止'),
	transfer: $t('pages.process.select.Transfer', '转办'),
	tempSave: $t('pages.process.select.Staging', '暂存'),
	skipNode: $t('pages.process.select.autoSkip', '自动跳过'),
	showFilter: $t('delegate.unfiller', '显示委托待办'),
	unshowFilter: $t('delegate.filler', '过滤委托待办'),
}
